﻿using Ninject;
using Ninject.Syntax;

namespace HobSoft.SoccerBet2014.Domain.Common.Factory
{
    using Domain.Core;
    using Domain.Factory;
    using Domain.Schedule;

    public class ScheduleTimerFactory : IScheduleTimerFactory
    {
        private readonly IResolutionRoot _resolutionRoot;

        public ScheduleTimerFactory(IResolutionRoot resolutionRoot)
        {
            _resolutionRoot = resolutionRoot;
        }

        public ITimer CreateOrGet()
        {
            return _resolutionRoot.Get<ITimer>();
        }

        object IServiceFactory.CreateOrGet()
        {
            return _resolutionRoot.Get<ITimer>();
        }
    }
}
